clear
graph set print logo off
graph set print tmargin 1
graph set print lmargin 1
set more off, perm
set emptycells drop


clear
clear matrix
set matsize 800
set memory 4g
set varabbrev on


*********************************************************
************* 		Master File 	*********************
*********************************************************

* Run Matlab Master Before Executing Stata Files!

**********************************
**Change paths********************
**********************************

global root "/Users/fkoenig/Library/CloudStorage/Box-Box/Replication Reservation Wage"

global do_path "$root/Stata files"

global data_path "$root/processed data"
global prep_data "$root/raw data"
global log_path "$root/log"
global output "$root/output"

global datum = subinstr(c(current_date)," ","",.)

cd "$data_path"

**********************************
**	 Data construction ***********
**********************************
cd "$do_path"
do 1_DataBuild_Ger.do

**********************************
** Tables and Figures  ***********
**********************************


cd "$log_path"
cap log close
log using preparation${datum}, replace

* If Figure1 produces an error, make sure you ran the Matlab Master code before running Stata!
cd "$do_path"
do Figure1.do

cd "$do_path"
do Table1.do

cd "$do_path"
do Table2.do

cap log close

